package com.zzl.finance.order.entity.feign;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.general.common.utils.DoubleSerialize;
import com.zzl.general.common.utils.DoubleToPercentSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 融资申请单
 *
 * @author wztsl
 * @date 2022-02-24 13:53:42
 */
@Data
@TableName("t_ticket_finance")
@ApidocModel
public class TicketFinanceEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    private String id;
    @ApidocModelProperty(description = "票面金额")
    private Double ticketAmount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "兑付日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date cashTime;
    @ApidocModelProperty(description = "核心企业id")
    private Integer coreEnterpriseId;
    @ApidocModelProperty(description = "核心企业名称")
    private String coreEnterpriseName;
    @ApidocModelProperty(description = "开立申请的票的原始票id")
    private String ticketOriginId;
    @ApidocModelProperty(description = "融资企业 id")
    private Integer enterpriseId;
    @ApidocModelProperty(description = "融资开户行行号")
    private String financeDepositBankNo;
    @ApidocModelProperty(description = "融资对公账户")
    private String financeDepositBank;
    @ApidocModelProperty(description = "融资银行账号id")
    private Integer financeBankId;
    @ApidocModelProperty(description = "融资企业名称")
    private String financeEnterpriseName;
    @ApidocModelProperty(description = "开户网点名称")
    private String financeDepositBankName;
    @ApidocModelProperty(description = "账户类型")
    private String accountType;
    @ApidocModelProperty(description = "账户名称")
    private String accountName;
    @ApidocModelProperty(description = "银行名称")
    private String bankName;
    @ApidocModelProperty(description = "银行代码")
    private String bankCode;
    @ApidocModelProperty(description = "开户支行名称")
    private String bankBranch;
    @ApidocModelProperty(description = "联行号")
    private String bankNumber;
    @ApidocModelProperty(description = "金融机构id")
    private Integer instinctyId;
    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;
    @ApidocModelProperty(description = "凭证的金融机构id")
    private Integer ticketInstinctyId;
    @ApidocModelProperty(description = "凭证的金融机构名称")
    private String ticketInstinctyName;
    @ApidocModelProperty(description = "金融产品")
    private Integer productId;
    @ApidocModelProperty(description = "金融产品名称")
    private String productName;
    @ApidocModelProperty(description = "融资方式, 0:无方式，,1:买断式，2：回购式")
    private Integer financeType;
    @ApidocModelProperty(description = "融资票据id")
    private String ticketId;
    @ApidocModelProperty(description = "票据编号")
    private String ticketNo;
    @ApidocModelProperty(description = "预估放款金额")
    private Double estimateLoanAmount;
    @ApidocModelProperty(description = "放款金额")
    private Double loanAmount;
    @ApidocModelProperty(description = "放款比例")
    private Double loanProprotion;
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "服务费")
    private Double serviceChage;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "放款日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date disbursementDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "预计放款日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date estimateDisbursementDate;
    @ApidocModelProperty(description = "融资编号")
    private String financeBillNo;
    @ApidocModelProperty(description = "融资上链地址")
    private String financeBillAddress;
    @ApidocModelProperty(description = "票据状态 1：融资待复核 2、融资已复核 3、平台待复核 4、平台已复核 5、待放款")
    private Integer ticketStatus;
    @ApidocModelProperty(description = "审批状态 10：供应商驳回 11、供应商通过 20、平台驳回 21、平台通过 30、金融机构驳回 31、金融机构通过")
    private Integer approveStatus;
    @ApidocModelProperty(description = "融资成本")
    private Double financingCost;
    @ApidocModelProperty(description = "融资成本详情")
    private String financingCostDetail;
    @ApidocModelProperty(description = "额度编号")
    private String creditNo;
    @ApidocModelProperty(description = "凭证ID")
    private String billCode;
    @ApidocModelProperty(description = "融资本金")
    private Double sellAmount;
    @ApidocModelProperty(description = "转让本金")
    private Double transferAmount;
    @ApidocModelProperty(description = "融资相关附件id，多个id之间用逗号分隔")
    private String fileIds;
    @ApidocModelProperty(description = "文件下载路径，多个用逗号分隔")
    private String filePath;
    @ApidocModelProperty(description = "数据来源")
    private Integer dataChannel;
    @ApidocModelProperty(description = "部门id")
    private Integer orgId;
    @ApidocModelProperty(description = "1 表示删除，0 表示未删除")
    private Integer isDeleted;
    @ApidocModelProperty(description = "是否进入预兑付状态，0：未预兑付；1：进入预兑付")
    private Integer advancePaymentStatus;
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "创建时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "修改时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @ApidocModelProperty(description = "创建人")
    private Integer creatorId;
    @ApidocModelProperty(description = "修改人")
    private Integer updaterId;
    @ApidocModelProperty(description = "备注")
    private String remark;
    @ApidocModelProperty(description = "融资利率是否年化,0：否，1:是")
    private Integer isAnnualizedInterestRate;
    @JsonSerialize(using = DoubleToPercentSerialize.class)
    @ApidocModelProperty(description = "融资利率")
    private Double annualizedInterestRate;
    @JsonSerialize(using = DoubleToPercentSerialize.class)
    @ApidocModelProperty(description = "平台服务费率")
    private Double platServiceRate;
    @ApidocModelProperty(description = "平台服务费率是否年化，0 否，1 是")
    private Integer isAnnualizedPlatServiceRate;
    @ApidocModelProperty(description = "宽限期是否计息，0 否，1 是")
    private Integer isGraceCost;
    @ApidocModelProperty(description = "宽限天数")
    private Integer graceDays;
    @ApidocModelProperty(description = "业务方式 1 无追索权")
    private Integer businessMode;
    @ApidocModelProperty(description = "用章类型 1 公章")
    private Integer sealType;
    @ApidocModelProperty(description = "业务类型 1 公开型")
    private Integer businessType;
    @ApidocModelProperty(description = "预计融资利息")
    @JsonSerialize(using = DoubleSerialize.class)
    private Double estimatedFinancingInterest;
    @ApidocModelProperty(description = "金融机构复核")
    private String financeCheckRemark;
    @ApidocModelProperty(description = "平台复核备注")
    private String platformCheckRemark;
    @ApidocModelProperty(description = "融资方复核备注")
    private String supplierCheckRemark;
    @ApidocModelProperty(description = "转单企业id")
    private Integer transferEnterpriseId;
    @ApidocModelProperty(description = "转单企业名称")
    private String transferEnterpriseName;
    @ApidocModelProperty(description = "开户行")
    private String depositBank;
    @ApidocModelProperty(description = "合同编号")
    private String contractNo;
    @ApidocModelProperty(description = "母单票据id")
    private String parentTicketId;
    @ApidocModelProperty(description = "母单票据编号")
    private String parentTicketNo;
    @ApidocModelProperty(description = "融资后留存的票据id")
    private String retentionTicketId;
    @ApidocModelProperty(description = "融资后留存的票据编号")
    private String retentionTicketNo;
    @ApidocModelProperty(description = "复核时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date reviewTime;
    @ApidocModelProperty(description = "平台审批时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date platApprovalTime;
    @ApidocModelProperty(description = "签署时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;
    @ApidocModelProperty(description = "复核人")
    private Integer reviewUserId;
    @ApidocModelProperty(description = "平台审批人")
    private Integer platApprovalUserId;
    @ApidocModelProperty(description = "签署人")
    private Integer signUserId;


}
